package net.ssta.common;

import javax.naming.InitialContext;
import javax.sql.DataSource;

import org.apache.log4j.Logger;


public class DataBaseConfig {
	private static Logger log = Logger.getLogger(DataBaseConfig.class.getClass()); 
	
	/**
	 * 
	 * @return
	 */
	public static DataSource getFrameworkDataSource(){
		DataSource ds =null;
		try{
			InitialContext initCtx = new InitialContext();
			ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/rcframework");
			//ds = (DataSource) initCtx.lookup("jdbc/rcframework");
		}catch(Exception e){
			log.error("获取平台数据库出错:"+e);
		}
		return ds;
	}
	

}
